<template>
	<uv-cell-group>
		<uv-cell icon="" title="电站封面" :value="detaileData.cover"></uv-cell>
		<uv-cell icon="" title="电站名称" :value="detaileData.name"></uv-cell>
		<uv-cell icon="" title="地址" :value="detaileData.position"></uv-cell>
		<uv-cell icon="" title="装机容量（KWP）" :value="detaileData.installedCapacity"></uv-cell>
		<uv-cell icon="" title="电站类型" :value="detaileData.dtype">
			<!-- 自定义右侧值 -->
			<template v-slot:value>
				<text v-if="detaileData.dtype == 0">户用电站</text>
				<text v-else-if="detaileData.dtype == 1">集中式电站</text>
				<text v-else-if="detaileData.dtype == 2">分布式电站</text>
			</template>
		</uv-cell>

		<uv-cell icon="" title="建站日期" :value="detaileData.establishDate"></uv-cell>
		<uv-cell icon="" title="电站ID" :value="detaileData.id"></uv-cell>
		<uv-cell icon="" title="方位角（°）" :value="detaileData.azimuth"></uv-cell>
		<uv-cell icon="" title="倾角（°）" :value="detaileData.dipangle"></uv-cell>
		<uv-cell icon="" title="并网时间" :value="detaileData.connectionTime"></uv-cell>
		<uv-cell icon="" title="并网状态" :value="detaileData.connectionStatus"></uv-cell>
		<uv-cell icon="" title="度电收益（元/kWh）" :value="detaileData.dprofit"></uv-cell>
		<uv-cell icon="" title="总成本（万元）" :value="detaileData.cost"></uv-cell>
		<uv-cell icon="" title="业主姓名" :value="detaileData.ownerName"></uv-cell>
		<uv-cell icon="" title="联系电话" :value="detaileData.telephone"></uv-cell>
		<uv-cell icon="" title="工作单位" :value="detaileData.company"></uv-cell>
	</uv-cell-group>
</template>

<script setup>
	import {
		ref
	} from "vue"
	import {
		reqStationDetail
	} from "@/api/model/photovoltaic"
	import {
		onLoad,
		onPullDownRefresh,
		onReachBottom
	} from '@dcloudio/uni-app'
	const props = defineProps({
		dzId: {
			type: String
		}
	})
	const queryParams = ref({

		"isPagination": true,
		"pageNum": 1,
		"pageSize": 10,
		"queryObj": {
			"name": "",
			"communi": "",
			"policeStatus": "",
			"dtype": ""
		}

	})
	const detaileData = ref({})

	const getDetail = async () => {
		let res = await reqStationDetail(props.dzId)
		detaileData.value = res.data.data
		console.log("测试的电站详情", res.data.data)
	}
	onLoad(() => {
		getDetail()
	})
</script>

<style lang="scss" scoped>
</style>